package com.boarsoft.boar.app;

import com.boarsoft.bean.ReplyInfo;
import com.boarsoft.boar.entity.AppInfo;
import com.boarsoft.boar.entity.AppInst;

public interface AppHandler {

	short test(String addr);

	boolean exists(String addr);

	/**
	 * 供配置中心调用，将新的配置文件同步给应用的某个实例
	 * 
	 * @param app
	 * @param ai
	 * @param code
	 * @param bytes
	 * @param dp
	 *            deploy path (config file's relative path)
	 * @return
	 * @throws IllegalAccessException
	 */
	ReplyInfo<Object> sync(AppInfo app, AppInst ai, String code, byte[] bytes, String dp) throws IllegalAccessException;
}